using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace ClientTools.Client.Controls
{
    public class BaseUserControl: UserControl 
    {
        private Library.Settings.Profile _actProfile;
        private object _actProvider;

        protected internal Library.Settings.Profile ActProfile
        {
            get { return _actProfile; }
            set { _actProfile = value; }
        }

        protected internal object ActProvider
        {
            get { return _actProvider; }
            set { _actProvider = value; }
        }

        protected bool ImplementsLogging() 
        { 
            return (this._actProvider.GetType().GetInterface(typeof(Library.Interfaces.ILogging).Name) != null);
        }

        protected bool ImplementsStats()
        {
            return (this._actProvider.GetType().GetInterface(typeof(Library.Interfaces.IStats).Name) != null);
        }

        protected bool ImplementsVersions()
        {
            return (this._actProvider.GetType().GetInterface(typeof(Library.Interfaces.IVersions).Name) != null);
        }

        protected bool ImplementsPackager()
        {
            return (this._actProvider.GetType().GetInterface(typeof(Library.Interfaces.IPackager).Name) != null);
        }

        protected bool ImplementsMedia()
        {
            return (this._actProvider.GetType().GetInterface(typeof(Library.Interfaces.IMedia).Name) != null);
        }
    }
}
